#include "2048.h"
void menu() // 菜单
{
    printf("***********************************\n");
    printf("****   ♥    2048小游戏     ♥   ****\n");
    printf("****   1.play        0.exit    ****\n");
    printf("***********************************\n");
}
void choose() // 菜单中的选项
{
    int input = 0;
    do
    {
        menu();
        printf("请选择：");
        scanf("%d", &input);
        while (getchar() != '\n')
            ;
        switch (input)
        {
        case 1:
            game();
            break;
        case 0:
            printf("退出游戏\n");
            break;
        default:
            printf("输入错误，请重新输入\n");
            break;
        }
    } while (input);
}
void game() // 游戏主体运行流程
{
    char input;
    int board[ROW][COL] = {0};
    system("clear");
    DisplayBoard(board, ROW, COL);
    move(board, ROW, COL);
    printf("\n");
}
int main()
{
    int board[ROW][COL] = {0};
    choose();
    return 0;
}